﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:Controls="clr-namespace:Resources.Controls"
                    >

    <ResourceDictionary.MergedDictionaries>
        <!--总颜色样式定义-->
        <ResourceDictionary Source="./Themes/Colors.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!--普通按钮样式-->
    <Style x:Key="BtnStyle" TargetType="{x:Type Button}">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="{StaticResource bg_text}"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle x:Name="rectangle" Margin="0" StrokeThickness="0" Fill="{StaticResource btn_bg_normal}"/>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" Margin="0" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_mouseover}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_pressed}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_normal}"/>
                            <Setter Property="OpacityMask" TargetName="contentPresenter" Value="{StaticResource btn_content_enabled}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--冷却计时按钮样式-->
    <Style x:Key="TimerBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle x:Name="rectangle" Margin="0" StrokeThickness="0" Fill="{StaticResource btn_bg_normal}"/>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" Margin="0" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <EventTrigger RoutedEvent="Button.Click">
                            <BeginStoryboard>
                                <Storyboard FillBehavior="Stop">
                                    <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(ContentPresenter.Content)" Storyboard.TargetName="contentPresenter">
                                        <DiscreteStringKeyFrame KeyTime="0" Value="已提交"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:1" Value="等待(30)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:2" Value="等待(29)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:3" Value="等待(28)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:4" Value="等待(27)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:5" Value="等待(26)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:6" Value="等待(25)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:7" Value="等待(24)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:8" Value="等待(23)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:9" Value="等待(22)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:10" Value="等待(21)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:11" Value="等待(20)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:12" Value="等待(19)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:13" Value="等待(18)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:14" Value="等待(17)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:15" Value="等待(16)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:16" Value="等待(15)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:17" Value="等待(14)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:18" Value="等待(13)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:19" Value="等待(12)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:20" Value="等待(11)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:21" Value="等待(10)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:22" Value="等待(09)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:23" Value="等待(08)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:24" Value="等待(07)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:25" Value="等待(06)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:26" Value="等待(05)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:27" Value="等待(04)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:28" Value="等待(03)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:29" Value="等待(02)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:30" Value="等待(01)"/>
                                        <DiscreteStringKeyFrame KeyTime="0:0:31" Value="等待(00)"/>
                                    </StringAnimationUsingKeyFrames>
                                    <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(Button.IsEnabled)">
                                        <DiscreteBooleanKeyFrame KeyTime="0" Value="False"/>
                                        <DiscreteBooleanKeyFrame KeyTime="0:0:32" Value="True"/>
                                    </BooleanAnimationUsingKeyFrames>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_mouseover}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_pressed}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_normal}"/>
                            <Setter Property="OpacityMask" TargetName="contentPresenter" Value="{StaticResource btn_content_enabled}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="{StaticResource bg_text}"/>
    </Style>

    <!--MessageBox关闭按钮样式-->
    <Style x:Key="MsgBoxCloseBtn" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource MyButtonHoverBrush}"></DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Background" Storyboard.TargetProperty="(Border.Background)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{StaticResource MyButtonPressedBrush}"></DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background" Background="{StaticResource btn_bg_normal}">
                            <!--<Border Margin="1,0,1,1" BorderBrush="#59FFFFFF" BorderThickness="1" CornerRadius="0,0,1,0"/>-->
                        </Border>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        <Path x:Name="path" Fill="White" Margin="0,0,0,1" Visibility="Collapsed" Height="6" Width="7" Stretch="Fill" Opacity="1"
		Data="M 2,6 C2,6 3,6 3,6 3,6 3,5 3,5 3,5 4,5 4,5 4,5 4,6 4,6 4,6 5,6 5,6 5,6 7,6 7,6 7,6 7,5 7,5 7,5 6,5 6,5 6,5 6,4 6,4 6,4 5,4 5,4 5,4 5,2 5,2 5,2 6,2 6,2 6,2 6,1 6,1 6,1 7,1 7,1 7,1 7,0 7,0 7,0 5,0 5,0 5,0 4,0 4,0 4,0 4,1 4,1 4,1 3,1 3,1 3,1 3,0 3,0 3,0 2,0 2,0 2,0 0,0 0,0 0,0 0,1 0,1 0,1 1,1 1,1 1,1 1,2 1,2 1,2 2,2 2,2 2,2 2,4 2,4 2,4 1,4 1,4 1,4 1,5 1,5 1,5 0,5 0,5 0,5 0,6 0,6 0,6 2,6 2,6 z"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--系统关闭按钮样式-->
    <Style x:Key="SysCloseBtn" TargetType="{x:Type Button}">
        <Setter Property="ToolTip" Value="关闭"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle x:Name="rectangle" StrokeThickness="0" Fill="{StaticResource tilebtn_bg}"/>
                        <Path x:Name="cross" Data="M6,6 L6,6 10,10 M10,6 L10,6 6,10" Fill="White" 
								Stretch="Fill" Stroke="White" Height="10" Width="12" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource MyButtonHoverBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource MyButtonPressedBrush}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False"/>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--系统最小化按钮样式-->
    <Style x:Key="SysMinBtn" TargetType="{x:Type Button}">
        <Setter Property="ToolTip" Value="最小化"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle x:Name="rectangle" StrokeThickness="0" Fill="{StaticResource tilebtn_bg}"/>
                        <Path x:Name="cross" Data="F1 M 19,38L 57,38L 57,44L 19,44L 19,38 Z " Fill="White" 
								Stretch="Fill" Stroke="White" Height="3" Width="10" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,8"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource minbtn_mouseover}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource minbtn_pressed}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False"/>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--删除账号信息的关闭按钮样式-->
    <Style x:Key="CloseBtn" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle x:Name="rectangle"/>
                        <Path x:Name="cross" Data="M6,6 L6,6 10,10 M10,6 L10,6 6,10" Fill="White" 
								Stretch="Fill" Stroke="White" Height="10" Width="12" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource closebtn_bg_mouseover}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource closebtn_bg_pressed}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False"/>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--系统标志按钮样式-->
    <Style x:Key="TipBtn" TargetType="{x:Type Button}">
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontSize" Value="8"/>
        <Setter Property="Foreground" Value="{StaticResource bg_text}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Path Stretch="Fill" Height="50" Fill="#FF6EB3F7" Data="M33.5,0 L33.5,4 30.5,4 z M3,0 L33,0 30,4 30,50 15,40 0,50 0,4 z"/>
                        <Path VerticalAlignment="Top" Stretch="Fill" Margin="3.335,10.005,6.665,0" Height="13.333" Fill="White" Data="F1 M 38,28.5C 41.1667,28.5 50.2708,20.5833 55.0208,30.0833C 59.7708,39.5833 58.5833,52.25 55.4167,52.25C 47.5,52.25 52.25,44.3333 38,44.3333C 23.75,44.3333 28.5,52.25 20.5833,52.25C 17.4167,52.25 16.2292,39.5833 20.9792,30.0833C 25.7292,20.5834 34.8333,28.5 38,28.5 Z M 26.9167,32.0625L 26.9167,34.8334L 24.1458,34.8334L 24.1458,38L 26.9167,38L 26.9167,40.7709L 30.0833,40.7709L 30.0833,38L 32.8542,38L 32.8542,34.8334L 30.0833,34.8334L 30.0833,32.0625L 26.9167,32.0625 Z M 45.125,34.0417C 44.2505,34.0417 43.5416,34.7506 43.5416,35.625C 43.5416,36.4995 44.2505,37.2084 45.125,37.2084C 45.9994,37.2084 46.7083,36.4995 46.7083,35.625C 46.7083,34.7506 45.9994,34.0417 45.125,34.0417 Z M 48.2917,31.2708C 47.4172,31.2708 46.7083,31.9797 46.7083,32.8542C 46.7083,33.7286 47.4172,34.4375 48.2917,34.4375C 49.1661,34.4375 49.875,33.7286 49.875,32.8542C 49.875,31.9797 49.1661,31.2708 48.2917,31.2708 Z M 48.2917,37.2083C 47.4172,37.2083 46.7083,37.9172 46.7083,38.7917C 46.7083,39.6661 47.4172,40.375 48.2917,40.375C 49.1661,40.375 49.875,39.6661 49.875,38.7917C 49.875,37.9172 49.1661,37.2083 48.2917,37.2083 Z M 51.4583,34.0417C 50.5839,34.0417 49.875,34.7505 49.875,35.625C 49.875,36.4995 50.5839,37.2083 51.4583,37.2083C 52.3328,37.2083 53.0417,36.4995 53.0417,35.625C 53.0417,34.7505 52.3328,34.0417 51.4583,34.0417 Z "/>
                        <ContentPresenter HorizontalAlignment="Left" Height="11.167" Margin="2.5,26,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Top"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True"/>
                        <Trigger Property="IsPressed" Value="True"/>
                        <Trigger Property="IsEnabled" Value="False"/>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--图片按钮样式-->
    <Style x:Key="picBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid x:Name="grid">
                         <ContentPresenter  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" TargetName="grid" Value="{StaticResource btn_bg_mouseover}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" TargetName="grid" Value="{StaticResource btn_bg_pressed}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" TargetName="grid" Value="{StaticResource btn_bg_enabled}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--图片切换按钮样式-->
    <Style x:Key="picChangeBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="MinHeight" Value="25"/>
        <Setter Property="Cursor" Value="Hand"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Border x:Name="border" Background="Black" Opacity="0.2" CornerRadius="5,5,5,5">
                            <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Opacity" TargetName="border" Value="0.6"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <!--<Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_pressed}"/>-->
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">

                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Introduction按钮样式-->
    <Style x:Key="introductBtnStyle" TargetType="{x:Type Button}">
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Foreground" Value="{StaticResource bg_text}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Rectangle x:Name="rectangle" Margin="0" StrokeThickness="0" Fill="{StaticResource tilebtn_bg}"/>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="Center" Margin="0" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsFocused" Value="True"/>
                        <Trigger Property="IsDefaulted" Value="True"/>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource mouseover_bg}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_pressed}"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Fill" TargetName="rectangle" Value="{StaticResource btn_bg_pressed}"/>
                            <Setter Property="OpacityMask" TargetName="contentPresenter" Value="{StaticResource btn_content_enabled}"/>
                            <Setter Property="ContentPresenter.Content" TargetName="contentPresenter" Value="已添加"/>
                        </Trigger> 
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>